package mysql

import "gorm.io/gorm"

type Doctor struct {
	gorm.Model
	Name     string `gorm:"type:varchar(50);unique;医生姓名"`
	Yuanqu   string `gorm:"type:varchar(50);院区"`
	Zhicen   string `gorm:"type:varchar(20);职称"`
	Keshi    string `gorm:"type:varchar(20);科室"`
	Biaoqian string `gorm:"type:varchar(30);标签"`
	Jianjie  string `gorm:"type:varchar(100);简介"`
}

// 封装函数添加
func (d *Doctor) Create() error {
	return DB.Create(&d).Error
}
